//************************************************************************
//     dfregexcache.h
//     2009 © DigiFi Limited
//
//     This is the header file defines the interface into the RegEx cache,
//     which is based on a Random Binary Search Tree
//
//************************************************************************


#ifndef DFREGEXCACHE_HEADER
#define DFREGEXCACHE_HEADER

// list of errors
#define DFREGEXCACHE_ENOTFOUND			-1
#define DFREGEXCACHE_EALREADYCACHED		-2
#define DFREGEXCACHE_EADDFAILED			-3


// get a compiled regex of name regex_name
int dfregexcache_get(char* regex_name, void** compiled_regex);


// cache a compiled regex
int dfregexcache_cache(char* regex_name, void* compiled_regex);


// free memory in the cache
void dfregexcache_free(void);


void dfregexcache_dump(void);



#endif